#ifndef PUBLICTRANSPORTSG_H_
#define PUBLICTRANSPORTSG_H_

#include <e32base.h>
#include "HTTPUtils.h"

struct MPublicTransportCallbackBusarrivaltime
	{
	virtual void MPublicTransportCallbackBusarrivaltimeRunL(const TDesC8& aStop, TInt aStatus, TInt aLastError, TInt aStatusCode, const TDesC8& aService, const TDesC8& aNextBus, const TDesC8& aSubsequentBus, TInt aIndex) = 0;
	};
class CPublicTransportRequestBusarrivaltime : public CBase, public MHTTPTransactionCallback
	{
private:
	HBufC8* iStop;
	RBuf8 iBody;
	MPublicTransportCallbackBusarrivaltime* iTarget;
	RHTTPTransaction iTransaction;
	RHTTPSession* iSession;
	void ConstructL();
	TBool iTransactionSubmitted;
	TInt iLastError;

public:
    virtual void MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent);
    virtual TInt MHFRunError(TInt aError, RHTTPTransaction aTransaction, const THTTPEvent& aEvent);
	void SubmitL(RHTTPSession& aSession, const TDesC8& aStop, MPublicTransportCallbackBusarrivaltime* aTarget);
	TBool RequestPending() const;
	void Cancel();
	static CPublicTransportRequestBusarrivaltime* NewLC();
	static CPublicTransportRequestBusarrivaltime* NewL();
	virtual ~CPublicTransportRequestBusarrivaltime();
	};

#endif /* PUBLICTRANSPORTSG_H_ */
